package book;

public class BookList {
    Book[] books = new Book[10];
    private int useSide;
    public BookList (){
        books[0] = new Book("三国演义", "罗贯中", 22, "小说");
        books[1] = new Book("水浒传", "施耐庵", 12, "小说");
        books[2] = new Book("西游记", "吴承恩", 32, "小说");
        useSide = 3;
    }

    public int getUseSide() {
        return useSide;
    }

    public void setUseSide(int useSide) {
        this.useSide = useSide;
    }

    //获得某本书
    public Book getBook(int pos){//卡壳
        return this.books[pos];
    }

    //加一本书
    public void setBook(int pos, Book book){
        this.books[pos] = book;
    }
}
